package test;

import java.awt.Container;
import java.awt.Font;
import java.awt.Insets;
import javax.swing.JEditorPane;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextField;

public class Browser extends JFrame{
	private static final long serialVersionUID = 1L;

	public Browser() {
		field = new JTextField();
		display = new JEditorPane();
		pane = new JScrollPane(display);		
	}
	
	public static void main(String args []){
		Browser brow = new Browser();
		brow.frameHandler();
	}
	
	private void frameHandler() {
		setTitle("My Browser");
		setSize(1366, 735);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setVisible(true);
		setResizable(false);
		setLayout(null);
		setLocationRelativeTo(null);
		addComponentsToFrame(getContentPane());
	}

	private void addComponentsToFrame(Container contentPane) {
		Insets insets = getInsets();
		
		contentPane.add(field);
		contentPane.add(pane);
		
		Font font = new Font("Monaco", Font.PLAIN, 15);
		
		field.setFont(font);
		field.setBounds(0 - insets.left, 30 - insets.top, 1366, 20);
	}

	public JTextField field;
	public JEditorPane display;
	public JScrollPane pane;
}
